
#include <iostream>

#include "Options.hpp"
#include "Ktrace.hpp"

void	fork_it()
{
	int pid = fork();
	if (pid == 0)
	{
		// Ktrace du pere (getppid) !
		std::cout << "Child: " << getpid() << "\tchild parent: " << getppid() << std::endl;
	}
	else
	{
		// exec de la commande a lancer ;)
		std::cout << "Parent: " <<  getpid() << "\tparent parent: " << getppid() << std::endl;
	}
}

int	main(int ac, char **av)
{
	Ktracens::Options options;
	if (!options.parse(ac, av) || options.exists("help") || options.checkConflicts())
		options.displayUsage();
	else
	{
		Ktracens::Ktrace k(options);
		k.run();
	}
	return 0;
}

